package com.jyx.designpatterns.mediator;


import java.lang.String;

public class ColleagueC implements Colleague {
	private ConcreteMediator mediator;//保存一个中介者的引用
	private String name;
	public ColleagueC(ConcreteMediator mediator)
	{
		this.mediator = mediator;
		mediator.registerColleagueC(this);
	}
	public void giveMess(String[] mess) {
		mediator.deliverMess(this, mess);
	}

	public void receiverMess(String mess) {
		System.out.println(name +" �յ���Ϣ��");
		System.out.println("\t" + mess);
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
}